import Config from "../main.config";
import Ajax from "../utils/Ajax";
module.exports = {
    /*
    * 交换联系方式
    * */
    exchangeContact: async function (data = {}) {
        let url = Config.api.messageAdd;
        return Ajax.request({
            method: "POST",
            url,
            data: {
                type: 3,
                ...data,
            }
        })
    },

    /*
    * 邀请投递
    * */
    invitationDelivery: async function (data = {}) {
        let url = Config.api.messageInvitation;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取简历消息  -- 企业
    * */
    getEnterpriseResumeList: async function (data = {}) {
        let url = Config.api.messageEnterpriseResumeList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取员工消息 -- 企业
    * */
    getEnterpriseOtherList: async function (data = {}) {
        let url = Config.api.messageEnterpriseOtherList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 处理员工申请消息 -- 企业
    * eventId 1同意  2拒绝
    * */
    handEnterpriseEmployee: async function (data = {}) {
        let url = Config.api.messageEnterpriseHandle;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },


    /*
    * 获取投递消息 -- 员工消息页
    * */
    getPersonnelResumeList: async function (data = {}) {
        let url = Config.api.messagePersonnelResumeList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取其它消息 -- 员工消息
    * */
    getPersonnelOtherList: async function (data = {}) {
        let url = Config.api.messagePersonnelOtherList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 处理申请交换联系方式  --  员工消息
    * */
    handPersonnelExchangeContact: async function (data = {}) {
        let url = Config.api.messagePersonnelHandleContact;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取消息提示信息数量
    * messageUserid 消息接收人id
    * type = 0简历投递1关注2收藏3获取联系方式4员工申请5员工退出6邀请投递简历7拒绝员工消息8新学长加入
    * */
    getTipsCount: async function (data = {}) {
        let url = Config.api.messageTipsCount;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 消息状态设置  //已读
    * id,
    * status 1已读
    * */
    setMessageReadStatus: async function (data = {}) {
        let url = Config.api.messageSetStatus;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取其它消息 -- 学生消息
    * */
    getStudentSeniorList: async function (data = {}) {
        let url = Config.api.messageStudentSeniorList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取其它消息 -- 学生消息
    * */
    getStudentOtherList: async function (data = {}) {
        let url = Config.api.messageStudentOtherList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 获取系统消息列表
    * */
    getSystemList: async function (data = {}) {
        let url = Config.api.messageSystemList;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    },

    /*
    * 发送公众号模板消息
    * */
    sendGZHTemplate: async function (data = {}) {
        let url = Config.api.messageTemplate;
        return Ajax.request({
            method: "POST",
            url,
            data
        })
    }
}